local weifu = fk.CreateSkill{
    name = "cpt11__weifu",
}

Fk:loadTranslationTable{
    ["cpt11__weifu"] = "威抚",
    [":cpt11__weifu"] = "准备阶段，你可弃置一名角色区域内一张牌，若此牌不为伤害类牌，其摸一张牌。",

    ["#cpt11__weifu"] = "威抚：选择一名角色，弃置其区域内一张牌",

    ["$cpt11__weifu1"] = "策略以入算，果烈以立威！",
    ["$cpt11__weifu2"] = "诈与和亲，不攻可得！",
}

weifu:addEffect(fk.EventPhaseStart,{
    anim_type = "offensive",
    can_trigger = function (self, event, target, player, data)
        return target == player and player.phase == Player.Start and player:hasSkill(weifu.name)
        and table.find(player.room.alive_players, function (p) return not p:isNude() end)
    end,
    on_cost = function (self, event, target, player, data)
        local room = player.room
        local targets = table.filter(room.alive_players, function (p) return not p:isNude() end)
        local tos = room:askToChoosePlayers(player,{
            min_num = 1,
            max_num = 1,
            targets = targets,
            skill_name = weifu.name,
            prompt = "#cpt11__weifu",
            cancelable = true,
        })
        if #tos > 0 then
            event:setCostData(self,{tos = tos})
            return true
        end
    end,
    on_use = function (self, event, target, player, data)
        local room = player.room
        local tos = event:getCostData(self).tos[1]
        local cards = room:askToChooseCard(player,{
            min_num = 1,
            max_num = 1,
            target = tos,
            skill_name = weifu.name,
            flag = "hej",
        })
        room:throwCard(cards, weifu.name, tos, player)
        if not Fk:getCardById(cards).is_damage_card then
            tos:drawCards(1, weifu.name)
        end
    end,
})

return weifu